import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token:"",
    userId:1,
    newhouseList:'',
    shoplist:'',
    xiangqinGoodsId:''
  },
  mutations: {
    setToken(state,token){
      state.token =token;
      window.localStorage.setItem('myToken',token)
    },
    shoplist(state,list){
        state.shoplist = list
    },
    getxiangqinGoodsId(state,id){
        // console.log(id);
        state.xiangqinGoodsId = id
    }
  },
  actions: {},
  modules: {}
})